<template>
  <div class="dashboard-editor-container">

    <div class="app-container home">
      <el-row :gutter="20" style="color: #676a6c">
        <el-col :sm="24" :lg="12" style="padding-left: 20px">
          <h2>后信息时代在线医疗平台</h2>
          <p>
            随着信息时代的到来，信息技术不仅改变了人们的生活方式，也为医学信息化奠定了强有力的基础，为医疗事业的发展提供了技术支持，从而有助于提高医疗服务水平。基于Springboot与vue的在线医疗平台方便了医护人员对患者进行诊断和治疗，实现“以患者为中心”的目标。同时，该医疗信息管理系统在提高医护人员的工作效率及医院的信息化管理水平方面具有重要作用。          <p>
          <el-button
            type="primary"
            size="mini"
            icon="el-icon-cloudy"
            plain
            @click="goTarget('https://gitee.com/lijie2002211329/online-medical-platform.git')">访问码云</el-button>
        </p>
        </el-col>
      </el-row>
      <el-divider />
    </div>

    <panel-group @handleSetLineChartData="handleSetLineChartData" />

    <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
      <line-chart :chart-data="lineChartData" />
    </el-row>

    <!--    <el-row :gutter="32">-->
    <!--      <el-col :xs="24" :sm="24" :lg="8">-->
    <!--        <div class="chart-wrapper">-->
    <!--          <raddar-chart />-->
    <!--        </div>-->
    <!--      </el-col>-->
    <!--      <el-col :xs="24" :sm="24" :lg="8">-->
    <!--        <div class="chart-wrapper">-->
    <!--          <pie-chart />-->
    <!--        </div>-->
    <!--      </el-col>-->
    <!--      <el-col :xs="24" :sm="24" :lg="8">-->
    <!--        <div class="chart-wrapper">-->
    <!--          <bar-chart />-->
    <!--        </div>-->
    <!--      </el-col>-->
    <!--    </el-row>-->

    <el-row :gutter="8">
      <el-col :xs="{span: 24}" :sm="{span: 24}" :md="{span: 24}" :lg="{span: 24}" :xl="{span: 12}" style="padding-right:8px;margin-bottom:30px;">
        <transaction-table />
      </el-col>
      <!--      <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">-->
      <!--        <todo-list />-->
      <!--      </el-col>-->
      <!--      <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}" style="margin-bottom:30px;">-->
      <!--        <box-card />-->
      <!--      </el-col>-->
    </el-row>

    <el-row :gutter="20">
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>联系信息</span>
          </div>
          <div class="body">
            <p>
              <i class="el-icon-s-promotion"></i> QQ：<el-link
              href="https://gitee.com/lijie2002211329/Medical-system.git"
              target="_blank">2132596913@qq.com</el-link
            >
            </p>
            <p>
              <i class="el-icon-chat-dot-round"></i> Gitee：<a
              href="javascript:"></a
            >
              <a href="https://gitee.com/lijie2002211329" target="_blank" class="item">https://gitee.com/lijie2002211329</a>
            </p>
            <p>
              <i class="el-icon-money"></i> Email：<a
              href="javascript:;"
              class="支付宝信息">m15958764153@163.com</a>
            </p>
          </div>
        </el-card>
      </el-col>

      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>日志记录</span>
          </div>
          <el-collapse accordion>
             <el-collapse-item title="       本项目在gitee上的提交记录">
              <ol>
                <li>当前完成系统管理模块、看病就诊模块、药品进存销模块、增加首页图表数据可视化界面</li>
                <li>新增门诊挂号功能，挂号模块跟科室模块数据绑定还存在问题</li>
                <li>新增新开就诊功能，页面数据显示待完善</li>
                <li>提交医生科室模块</li>
                <li>新增订单提交模块</li>
                <li>新增在线诊疗模块（多对多公共聊天室）</li>
                <li>优化在线诊疗模块U界面</li>
                <li>基于Echarts制作图表接口</li>
                <li>修复采购入库页面进入审核页面的路由跳转问题</li>
                <li>修复审核订单页面数据显示问题</li>
                <li>修复了门诊挂号板块科室搜索的数据绑定问题和采购入库的订单审核问题</li>
                <li>基本完成药品进存销管理板块</li>
                <li>完成新开就诊模块和收费查询模块</li>
                <li>添加了挂单号和患者库的图表接口</li>
                <li>后信息时代在线医疗平台1.0测试版本正式发布</li>
              </ol>
            </el-collapse-item>
          </el-collapse>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="24" :md="6" :lg="6">
        <el-card class="update-log">
          <div slot="header" class="clearfix">
            <span>Jay_123</span>
          </div>
          <div class="body">
              <span style="display: inline-block; height: 30px; line-height: 30px">
              有关我所知道的一切都愿与你交流
              </span>
          </div>
        </el-card>
      </el-col>
    </el-row>

  </div>
</template>

<script>
  import GithubCorner from '@/components/GithubCorner'
  import PanelGroup from './components/PanelGroup'
  import LineChart from './components/LineChart'
  import RaddarChart from './components/RaddarChart'
  import PieChart from './components/PieChart'
  import BarChart from './components/BarChart'
  import TransactionTable from './components/TransactionTable'
  import TodoList from './components/TodoList/index'
  import BoxCard from './components/BoxCard'

  const lineChartData = {
    newVisitis: {
      expectedData: [100, 120, 161, 134, 105, 160, 165],
      actualData: [120, 82, 91, 154, 162, 140, 145]
    },
    messages: {
      expectedData: [200, 192, 120, 144, 160, 130, 140],
      actualData: [180, 160, 151, 106, 145, 150, 130]
    },
    purchases: {
      expectedData: [80, 100, 121, 104, 105, 90, 100],
      actualData: [120, 90, 100, 138, 142, 130, 130]
    },
    shoppings: {
      expectedData: [130, 140, 141, 142, 145, 150, 160],
      actualData: [120, 82, 91, 154, 162, 140, 130]
    }
  }

  export default {
    name: 'DashboardAdmin',
    components: {
      GithubCorner,
      PanelGroup,
      LineChart,
      RaddarChart,
      PieChart,
      BarChart,
      TransactionTable,
      TodoList,
      BoxCard
    },
    data() {
      return {
        lineChartData: lineChartData.newVisitis
      }
    },
    methods: {
      handleSetLineChartData(type) {
        this.lineChartData = lineChartData[type]
      },
      goTarget(href) {
        window.open(href, "_blank");
      },
    }
  }
</script>

<style lang="scss" scoped>
  .dashboard-editor-container {
    padding: 32px;
    background-color: rgb(240, 242, 245);
    position: relative;

    .github-corner {
      position: absolute;
      top: 0px;
      border: 0;
      right: 0;
    }

    .chart-wrapper {
      background: #fff;
      padding: 16px 16px 0;
      margin-bottom: 32px;
    }
  }

  @media (max-width:1024px) {
    .chart-wrapper {
      padding: 8px;
    }
  }


</style>
